import request from '@/utils/request'

export default{
    addCourseInfo(courseInfo){
        return request({ 
            url:`eduservice/course`,
            method:'post',
            data:courseInfo
        });
    },
    getCourseInfo(courseId){
        return request({ 
            url:`eduservice/course/${courseId}`,
            method:'get'
        });
    },
    updateCourseInfo(courseInfo){
        return request({ 
            url:`eduservice/course`,
            method:'put',
            data:courseInfo
        });
    },
    getPublishCourseInfo(courseId){
        return request({ 
            url:`eduservice/course/publish/${courseId}`,
            method:'get'
        });
    },
    publishCourse(courseId){
        return request({ 
            url:`eduservice/course/${courseId}`,
            method:'put'
        });
    },
    getCourseList(){
        return request({ 
            url:`eduservice/course`,
            method:'get'
        });
    },
    deleteCourse(courseId){
        return request({ 
            url:`eduservice/course/${courseId}`,
            method:'delete'
        });
    },
}